Next | Prev | Up | Top | Contents | Index

Driver Flag Constant

Any device driver or STREAMS module should define a public name pfxdevflag as a static integer. This integer contains a bitmask with zero or more of the following flags, which are declared in sys/conf.h:

D_MPThe driver is prepared for multiprocessor systems.
D_WBACKThe driver handles its own cache-writeback operations.
D_MTThe driver is prepared for a multithreaded kernel.
D_OLDThe driver implements IRIX 4.x semantics.

The flag names are declared in the header file sys/ddi.h. A typical definition would resemble the following:

int testdrive_devflag = D_MP;

A STREAMS module should also provide this flag, but the only relevant bit value for a STREAMS driver is D_MP (see "Driver Flag Constant").

The flag value is saved in the kernel switch table with the driver's entry points (see "Kernel Switch Tables").

When a driver does not define a pfxdevflag, lboot saves a word containing D_OLD by default. See the note regarding D_OLD on page 142.


Flag D_MP
Flag D_WBACK
Flag D_MT
Flag D_OLD

Next | Prev | Up | Top | Contents | Index